package com.feifei.service.impl;

import com.feifei.bean.Type;
import com.feifei.mapper.TypeMapper;
import com.feifei.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    TypeMapper typeMapper;
    @Override
    public Type getTypeById(Integer id) {
        Type type = typeMapper.selectByPrimaryKey(id);
        return type;
    }

    @Override
    public List<Type> getAllTypes() {
        List<Type> typeList = typeMapper.selectByExample(null);
return typeList;
    }
}
